Skip to content

Conversation

@Sangamesh1997
Copy link
Contributor

@Sangamesh1997 Sangamesh1997 commented Jul 15, 2025

Fixes grpc/grpc-java#11836
Update Android quickstart docs with AndroidX and Java compatibility notes

@vimanikag
Copy link

CC : @shivaspeaks

{{% /alert %}}

For AGP 7.x, it's recommended to use Java 11, 17, or 20 to avoid DexWorkAction / D8 issues.
While Java 21 might technically work, it's safer to avoid it due to potential compatibility quirks.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we know "AGP 7.x’s D8 supports bytecode up to v61, so Java 21+ (v65+) fails." why not explicitly mention that 21+ will not work?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed and updated the message.Thanks!

local (non-Android) computer.
{{% /alert %}}

For AGP 7.x, it's recommended to use Java 11, 17, or 20 to avoid DexWorkAction / D8 issues.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just mention 11 - 20

local (non-Android) computer.
{{% /alert %}}

For AGP 7.x, it's recommended to use Java 11 - 20 to avoid DexWorkAction / D8 issues.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move/merge this up earlier near/with the "Prerequisites". I don't think we need to give all the details here. Just something more like, "The example defaults to AGP 7.x which needs Java 11-17. If you upgrade it to AGP 8.x, it needs Java 17+"

Copy link
Contributor Author

@Sangamesh1997 Sangamesh1997 Jul 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done - moved to prerequisites section and simplify the wording as suggested. Thanks!

- [JDK][] version 7 or higher
- [JDK][] version 11 or higher.

1. The example uses AGP 7.x (compatible with Java 11–17). If you upgrade it to AGP 8.x requires Java 17+.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"If you upgrade it to AGP 8.x, it requires Java 17+."

@shivaspeaks
Copy link
Member

The issue mentioned in the description is not the right way. Just put the full link, it will automatically reduce it to the readable way. When in different repo, it should show like this grpc/grpc-java#.....

@shivaspeaks shivaspeaks changed the title grpc-io : update prerequisites with AndroidX with java version guidence in quickstart.md grpc-io : Update Android quickstart docs with AndroidX and java version guidance in quickstart.md Jul 21, 2025
Copy link
Member

@shivaspeaks shivaspeaks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated the title and description.

@shivaspeaks shivaspeaks changed the title grpc-io : Update Android quickstart docs with AndroidX and java version guidance in quickstart.md grpc-io: Update Android quickstart docs with AndroidX and java version guidance in quickstart.md Jul 21, 2025
@shivaspeaks shivaspeaks merged commit ad84a08 into grpc:main Jul 21, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Android Hello World app fails to build even after adding android.useAndroidX=true

5 participants